package com.assignwork.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springblade.core.mp.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import org.springblade.core.tool.utils.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * AssemblyLine
 */
@Data
@TableName("assembly_line")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "AssemblyLine对象", description = "作业线")
public class AssemblyLine extends BaseEntity {

    /** 作业线编号 */
    @ApiModelProperty(value = "作业线编号")
    private String lineNo;
    
    /** 作业类型 */
    @ApiModelProperty(value = "作业类型")
    private String loadType;

    private String cargoType;

    private String packageBulkKey;
    
    /** 计划量 */
    @ApiModelProperty(value = "计划量")
    private BigDecimal plannedQuantity;
    
    /** 班次key */
    @ApiModelProperty(value = "班次key")
    private String shiftKey;
    
    /** 备注 */
    @ApiModelProperty(value = "备注")
    private String remark;
    
    /** 计划ID */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "计划ID")
    private Long planId;

    @JsonFormat(pattern = DateUtil.PATTERN_DATE)
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
    private LocalDate planDate;
    
    /** 开始时间 */
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
    @ApiModelProperty(value = "开始时间")
    private LocalDateTime startTime;
    
    /** 结束时间 */
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
    @ApiModelProperty(value = "结束时间")
    private LocalDateTime endTime;
    
    /** 父级id */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "父级id")
    private Long parentId;
    
    /** 是否实际 */
    @ApiModelProperty(value = "是否实际")
    private Integer isReal;

    /** 调度结吨 */
    @ApiModelProperty(value = "调度结吨")
    private BigDecimal assignEndTon;

    /** 班次实绩 */
    @ApiModelProperty(value = "班次实绩")
    private BigDecimal shiftRealTon;

    /** 舱余吨 */
    @ApiModelProperty(value = "舱余吨")
    private BigDecimal cabinLeftTon;
}